﻿<UserControl xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"  x:Class="A_DirectDBAccess.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:bdg="clr-namespace:BindableDataGrid;assembly=BindableDataGrid"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">

    <sdk:TabControl>
        <sdk:TabItem Header="Update, Insert &amp; Delete">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition />
                    <RowDefinition />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions >
                    <ColumnDefinition />
                    <ColumnDefinition Width="100"/>
                </Grid.ColumnDefinitions>
                <TextBox x:Name="SQLStatements" Margin="4,4,2,2" AcceptsReturn="True"/>
                <Grid Grid.Column="1" Margin="0,2,2,0">
                    <Grid.RowDefinitions>
                        <RowDefinition />
                        <RowDefinition />
                    </Grid.RowDefinitions>
                    <Button Margin="2" Click="ExecuteStatement_Click">Execute</Button>
                    <Button Grid.Row="1" Margin="2" Click="CancelStatement_Click">Cancel</Button>
                </Grid>
                
                <ListBox Grid.ColumnSpan="2" Grid.Row="1" x:Name="StatementResults" Margin="4,2,4,4"/>
            </Grid>
        </sdk:TabItem>
        <sdk:TabItem Header="Query Tester">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions >
                    <ColumnDefinition />
                    <ColumnDefinition Width="100"/>
                </Grid.ColumnDefinitions>
                <!--<TextBox x:Name="SQLQuery" Margin="4,4,2,2" KeyUp="SQLQuery_KeyUp"/>-->
                <sdk:AutoCompleteBox x:Name="SQLQuery" Margin="4,4,2,2" KeyUp="SQLQuery_KeyUp"/>
                <Button Grid.Column="1" Margin="2,4,4,2" Click="ExecuteQuery_Click">Execute</Button>
                <bdg:BindableDataGrid Grid.ColumnSpan="2" Grid.Row="1" x:Name="QueryResults" Margin="4,2,4,4"/>
            </Grid>
        </sdk:TabItem>
    </sdk:TabControl>

</UserControl>
